package com.lei.springbootpractice.pojo;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.time.LocalDateTime;

@TableName("review")  // 指定对应数据库表名
public class ReviewPojo {
    @TableId("review_id")  // 标识主键并指定数据库列名
    private String reviewId;

    @TableField("product_id")  // 指定数据库列名
    private String productId;

    @TableField("user_id")  // 指定数据库列名
    private String userId;

    @TableField("rate")  // 指定数据库列名
    private Integer rate;

    @TableField("comment")  // 指定数据库列名
    private String comment;

    @TableField("create_time")  // 添加缺失的create_time字段映射
    private LocalDateTime createTime;

    @TableField("order_id")
    private String orderId;

    // Getters and Setters
    public String getReviewId() {
        return reviewId;
    }

    public void setReviewId(String reviewId) {
        this.reviewId = reviewId;
    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public Integer getRate() {
        return rate;
    }

    public void setRate(Integer rate) {
        this.rate = rate;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public String getOrderId() { return orderId; }
    public void setOrderId(String orderId) { this.orderId = orderId; }
}
